<?php
namespace app\api\exception;

use Exception;
use think\exception\Handle;
use think\exception\HttpException;
use think\exception\ValidateException;

class BaseException extends Exception
{

    public $state       = 0;
    public $msg         = "服务端异常";
    public $code        = 500;

	public function __construct($params = [])
    {
    	if(array_key_exists("state", $params)) $this->state = $params['state'];
        if(array_key_exists("msg", $params)) $this->msg = $params['msg'];
        if(array_key_exists("code", $params)) $this->code = $params['code'];
    }

}